package com.ls.test;

import com.ls.pojo.Device;
import com.ls.service.DeviceService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Text {

    @Test
    public void getDeviceAll(){
        ApplicationContext context=new ClassPathXmlApplicationContext("/appcationContext.xml");
       DeviceService service= (DeviceService) context.getBean("deviceService");
       List<Device> list= service.getDeviceAll();
       for (Device device: list){
           System.out.println(device);
       }
    }

    @Test
    public void uuu(){
        ApplicationContext context=new ClassPathXmlApplicationContext("appcationContext.xml");
        DeviceService service= (DeviceService) context.getBean("deviceService");
//        int ret=service.updateDevice()
    }
}
